C# get all items on list from other listint

44

C# get all items on list from other list<int> </int> -

var result = peopleList2.Where(p =&gt; peopleList1.All(p2 =&gt; p2.ID != p.ID));

C# get all items on list from other list<int> </int> -

var result = peopleList2.Where(p =&gt; !peopleList1.Any(p2 =&gt; p2.ID == p.ID));

Comments

Submit
0 Comments